      Module ElementStiffness_ThermalCapacity_Module
    
      Implicit None
      
      Contains
    
      Attributes(Device) Subroutine ElementStiffness_ThermalCapacity_GPU(Knodf,Iloca,Jloca,Shape,Wjacb,Coeff,Ecomp,Nevab)

!.... Form The Thermal Capacity Matrix

      Implicit None
!.... Input Variables:
      Integer Nevab
      Integer Knodf
      Integer Iloca
      Integer Jloca
      Double Precision Shape(Knodf)
      Double Precision Wjacb
      Double Precision Coeff
!.... Output Variables:
      Double Precision Ecomp(Nevab,Nevab)
!.... Local Variables:
      Integer Igash
      Integer Jgash
      Integer Inode
      Integer Jnode
      Double Precision Cons1
      Double Precision Cons2
!     Double Precision Dvolu
      
      Jgash=Jloca
      Do Jnode=1,Knodf
         Jgash=Jgash+1
         Cons1=Coeff*Wjacb*Shape(Jnode)
         Igash=Iloca
         Do Inode=1,Knodf
            Igash=Igash+1
            Cons2=Cons1*Shape(Inode)
            Ecomp(Igash,Jgash)=Ecomp(Igash,Jgash)+Cons2
         End Do
      End Do
      
      Return
      End
    
      End Module